﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.Collections.Generic;
using RealEstateApp.Library;

namespace RealEstateApp.WebUI.Models
{
    public class CustomerModel
    {
        public CustomerModel()
        {
            Tasks = new List<Task>();
        }

        public int CustomerId { get; set;}

        [Required]
        [Display(Name="Tên khách hàng")]
        public string Name { get; set; }

        [Display(Name = "Ngày sinh")]
        [DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
        public DateTime? BirthDate { get; set; }

        [Display(Name = "Địa chỉ liên hệ")]
        public string Address { get; set; }

        [Display(Name = "Điện thoại bàn")]
        public string Phone { get; set; }

        [Display(Name = "Di động")]
        public string Mobile { get; set; }

        [Display(Name = "Số Fax")]
        public string Fax { get; set; }

        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email")]
        public string Email { get; set; }

        public IList<Task> Tasks;

    }
}